package fr.emse.tatiana.replayable.analysis.graph;

import org.eclipse.draw2d.geometry.Rectangle;

import fr.emse.tatiana.replayable.Anchor;
import fr.emse.tatiana.replayable.analysis.GraphAnalysis;

public class EventChangeLayoutCommand extends AbstractLayoutCommand {

	private GraphAnalysis analysis;
	private Anchor anchor;
	private Rectangle layout;
	
	@Override
	public void execute() {
		analysis.setPosition(anchor,layout);
	}
	
	@Override
	public void setConstraint(Rectangle rect) {
		this.layout = rect;

	}

	@Override
	public void setModel(GraphAnalysis analysis, Object o) {
		this.analysis =  analysis;
		this.anchor = (Anchor) o;
	}

}
